Power management in electronic systems

ABSTRACT

In one embodiment, an electronic apparatus comprises at least one processor and a computer readable medium coupled to the processor and comprising logic instructions encoded in the computer readable medium, wherein the instructions, when executed in a processing system, cause the processing system to perform operations comprising initializing a direct memory access profiler in an electronic system, wherein the direct memory access is coupled to a policy manager in the electronic system, measuring at least one memory consumption characteristic of the electronic system, communicating the at least one memory consumption characteristic to a policy manager of the electronic system, and using the at least one memory consumption characteristic to adjust a power state of the electronic system.

RELATED APPLICATIONS

This application is a Continuation of U.S. patent application Ser. No. 13/171,157, filed on Jun. 28, 2011, and entitled “POWER MANAGEMENT IN ELECTRONIC SYSTEMS” and now U.S. Pat. No. 8,402,293, issued Mar. 19, 2013, which is a continuation of U.S. patent application Ser. No. 12/006,064, filed on Dec. 28, 2007, and entitled “POWER MANAGEMENT IN ELECTRONIC SYSTEMS” and now U.S. Pat. No. 7,971,084 issued Jun. 28, 2011, which is related to the following co-pending applications: U.S. Ser. No. 11/007,098 to Morgan, et al, entitled SYSTEM AND METHOD FOR ADAPTIVE POWER MANAGEMENT, and U.S. Ser. No. 11/006,917 to Vaidya, et al, entitled SYSTEM AND METHOD FOR ADAPTIVE POWER MANAGEMENT.

BACKGROUND

Many purchasers, users, and manufacturers of computer products are becoming increasingly sensitive to issues of power consumption. In some cases, consumers desire to lower their energy bills. Consumers may also prefer processing systems that generate less noise and heat, and there is typically a positive relationship between the amount of power consumed by a processing system and the amounts of noise and heat generated by that processing system. In addition, for a battery powered processing system such as a laptop computer, a cellular telephone (“cell phone”), a personal digital assistants (PDAs), etc., reducing the power consumption has the valuable effect of increasing the processing system's battery life (i.e., increasing the amount of time the processing system can be used before the battery must be recharged or replaced with a fresh battery).

A typical processing system includes many different components, such as a processor or microprocessor, a data storage device, and various input/output (I/O) devices. When a processing system is not off, each component within the processing system may consume some power. The terms “system power state” and “global power state” both refer to the aggregate power consumption of all of the components in a processing system. The term “device power state” refers to the power consumption of a particular component.

Typically, the processor is one of the most significant consumers of power in a processing system. The term “processor power state” refers specifically to the power consumption of a processor or microprocessor.

One approach to managing performance is to use a static prediction of performance needs. For instance, a developer of an end user application may initially determine through experimentation that certain functions or tasks of the application typically require a certain amount of processing power. The result of the experimentation may be considered static profiling information. The developer may then design the application to modify the performance level of the processing system before executing those functions or tasks. Such a software application thus manages the system performance based on the predicted needs.

Also, an operating system (OS) may schedule and run software entities such as processes, threads, and tasks, and the scheduler in the OS may include an application programming interface (API) that provides loading information pertaining to those processes, threads, and tasks. Other software programs can call that API to retrieve the loading information. The loading information may include, for instance, the total number of active processes, threads, and tasks. The programs that may obtain loading information from the OS scheduler may include power management software or debugging software, for example.

Static techniques for managing power present many disadvantages. For example, in a typical case, development of the software application will be made more difficult, because expected processing power requirements must be predicted by the developer, based on the previous analysis done, and then handled within the application. Furthermore, the predicted processing power requirements may differ substantially from the actual processing power requirements. Also, when a developer is attempting to design an application to handle the expected processing power requirements, the tools available for that application for modifying the system's performance level may be limited to the tools provided by a particular OS. This same limitation may apply to programs that obtain loading information from an OS API. Further, static analysis may not yield adequate power savings.

BRIEF DESCRIPTION OF THE DRAWINGS

The detailed description is described with reference to the accompanying figures.

FIG. 1 is a block diagram depicting an example embodiment of a suitable data processing environment in which certain aspects of an example embodiment of the present invention may be implemented;

FIG. 2 is a block diagram depicting software components for managing power in a processing system, in accordance with an example embodiment of the present invention;

FIG. 3 is a block diagram depicting software and hardware components in a processing system with communications capabilities, in accordance with an example embodiment of the present invention;

FIG. 4 is a flowchart illustrating operations a method to manage power in a processing system, in accordance with an example embodiment of the present invention.

DETAILED DESCRIPTION

Described herein are exemplary systems and methods to implement power management electronic systems. In the following description, numerous specific details are set forth to provide a thorough understanding of various embodiments. However, it will be understood by those skilled in the art that the various embodiments may be practiced without the specific details. In other instances, well-known methods, procedures, components, and circuits have not been illustrated or described in detail so as not to obscure the particular embodiments

Intel Corporation manufactures processors that incorporate technologies to support low power consumption and high performance processing for a wide range of services. In some cases, the technologies in those processors for supporting low power consumption and high performance processing may be referred to in general as Intel XScale™ technology. Intel Corporation currently distributes one or more families of processors that feature Intel XScale™ technology under various product designations or model numbers, such as the Intel™ PXA26x and the Intel™. PXA27x product families.

Example embodiments illustrated herein may include processing systems with processors that support Intel™ PCA. Alternative embodiments of the present invention include processing systems with other kinds of processors, whether manufactured by Intel Corporation or other manufacturers. As described in greater detail below, the example embodiment includes a processor with dynamic voltage management (DVM) and dynamic frequency management (DFM) capabilities.

FIG. 1 is a block diagram depicting an example embodiment of a suitable data processing environment in which certain aspects of an example embodiment of the present invention may be implemented. FIG. 1 and the following discussion are intended to provide a general description of a suitable environment in which certain aspects of the present invention may be implemented. As used herein, the terms “processing system” and “data processing system” are intended to broadly encompass a single machine, or a system of communicatively coupled machines or devices operating together. Exemplary processing systems include, without limitation, distributed computing systems, supercomputers, computing clusters, mainframe computers, mini-computers, client-server systems, personal computers, workstations, servers, portable computers, laptop computers, tablet processing systems, telephones, personal digital assistants (PDAs), handheld devices, mobile handsets, entertainment devices such as audio and/or video devices, and other devices for processing or transmitting information.

The data processing environment of FIG. 1, for example, may include a processing system 20 that includes one or more processors or central processing units (CPUs) 22 communicatively coupled to various other components via one or more buses or other communication conduits or pathways. CPU 22 may be implemented as an integrated circuit. The components coupled to CPU 22 may include one or more volatile or non-volatile data storage devices, such as random access memory (RAM) 27 and read-only memory (ROM) 29. A memory bus 44 may serve to couple RAM 27 and ROM 29 with CPU 22. For purposes of this disclosure, the term “ROM” may be used in general to refer to non-volatile memory devices such as erasable programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash ROM, flash memory, etc. CPU 22 may also be communicatively coupled to mass storage devices, such as one or more integrated drive electronics (IDE) drives, small computer systems interface (SCSI) drives, or other types of hard disk drives. Other types of mass storage devices and storage media that may be used by processing system 20 may include floppy disks, optical storage, tapes, memory sticks, digital video disks, biological storage, etc.

The components of processing system 20 that are communicatively coupled to processor 22 may also include one or more bus bridges. One or more of those bridges and associated buses may be used to connect processor 22, either directly or indirectly, with additional components, such as one or more storage devices, device controllers, input/output (I/O) ports, and I/O devices 34. For example, the additional components may include a video controller, a SCSI controller, a network controller, a universal serial bus (USB) controller, a keyboard controller, etc. In some embodiments, such components may be implemented as embedded devices, using components such as programmable or non-programmable logic devices or arrays, application-specific integrated circuits (ASICs), embedded computers, smart cards, and the like.

In some embodiments, processor 22 may be implemented as an integrated circuit (IC) that includes a processing core 24, as well as control circuits or control logic for implementing additional components. Such components may include an on-chip bus bridge 32, on-chip RAM 26, on-chip ROM 28, a performance monitoring unit (PMU) 30, and a memory controller 38. The IC may also feature one or more internal bus bridges and/or internal buses, such as system bus 40, for interconnecting various components within processor 22.

Processing system 20 may be controlled, at least in part, by input from conventional input devices, such as a keyboard or keypad, a pointing device, etc., and/or by directives received from one or more remote data processing systems 50, interaction with a virtual reality (VR) environment, biometric feedback, or other input sources or signals. Processing system 20 may send output to components such as a display device, remote data processing system 50, etc. Communications with remote data processing system 50 may travel through any suitable communications medium. Processing systems may be interconnected by way of a physical and/or logical network 36, such as a local area network (LAN), a wide area network (WAN), an intranet, the Internet, a public switched telephone network (PSTN), a cellular telephone network, etc. Communications involving network 36 may utilize various wired and/or wireless short range or long range carriers and protocols, including radio frequency (RF), satellite, microwave, Institute of Electrical and Electronics Engineers (IEEE) 802.11, Bluetooth, optical, infrared, cable, laser, etc.

The invention may be described by reference to or in conjunction with associated data including instructions, functions, procedures, data structures, application programs, etc. which when accessed by a machine result in the machine performing tasks or defining abstract data types or low-level hardware contexts. The data may be referred to in general as software, and it may be stored in volatile and/or non-volatile data storage.

For example, ROM 28 may include at least portions of a software application 70 for monitoring the performance of processing system 20 and managing the power consumption of processing system 20. Software application 70 may also be referred to as platform power manager (PPM) 70. In an example embodiment, PPM 70 may include instructions and other data for implementing the functionality described herein. As indicated by the dashed box in RAM 26, some or all of PPM 70 may be loaded into RAM 26, for example in connection with a boot process for processing system 20. In one embodiment, PPM 70 may then cause processing system to operate as described below. In alternative embodiments, processing system 20 may obtain PPM 70 from one or more other sources, such as ROM 29 and/or remote data processing system 50, and some or all of PPM 70 may be loaded into RAM 27.

FIG. 2 is a block diagram of a power management architecture 60, in accordance with an example embodiment of the present invention. As illustrated, power management architecture 60 includes PPM 70, which, from a logical perspective, resides above the hardware 120 of processing system 20, and above the device drivers 100 which serve as low-level software interfaces to various hardware components.

In the example embodiment, power management architecture 60 also includes an operating system (OS) 90 and user applications 66. Power management architecture 60 may also include one or more power management applications 68 which interact with PPM 70, as described in greater detail below. OS 90 may include code for various OS services 92 and a task scheduler 96. OS 90 may also include power management (PM) software 94 for implementing certain power management features. In the example embodiment, OS 90 also includes a sequence of instructions for causing processing core 24 to enter and exit idle mode. Such a sequence of instructions may be referred to as original equipment manufacturer (OEM) idle code 98, idle execution path 98, or simply idle path 98.

In the example embodiment, task scheduler 96 keeps track of which processes or tasks are currently running, and OS 90 executes idle path 98 whenever no processes or tasks are ready to run. In the example embodiment, OS 90 uses a variable duration idle, which exits in response to an event such as an interrupt. In alternative embodiments, the OS can use a fixed duration idle. The present invention may also be used in systems that do not use a thread or other dispatchable entity to implement the idle path.

In the example embodiment, PPM 70 includes various modules for monitoring system performance, modifying system power consumption, and performing related functions. As described in greater detail below, those modules may include a power policy manager 80, a user settings interface 72, a DMA profiler 74, a performance profiler 76, and an OS mapping module 78. Power policy manager 80 may also be referred to as policy manager 80. The different modules may communicate with each other through any suitable mechanisms, such as application programming interfaces (APIs) for example.

In the example embodiment, device drivers 100 register with PPM 70 through the device driver APIs. Consequently, device drivers 100 may receive notification from PPM 70 on all of the power management events, such as state transitions, frequency changes, and voltage changes. If a particular operating state is supported by OS 90, then PPM 70 may use the OS interface to notify device drivers 100. Otherwise, PPM 70 may use an independent interface between device drivers 100 and PPM 70. When a device driver receives a callback for a power management state transition or event, the device driver may transition into its new state and prepare the device for the next state. As an example, when a keypad driver transitions into a standby state, the keypad driver may configure the low-level registers so that the keypad driver can wakeup from standby state if the user presses the key on the keypad.

Device drivers 100 may also include logic for requesting a state change from PPM 70. For example, a battery driver may communicate with PPM 70 to request a reduced operating point for processing system 20, to reduce power consumption in response to determining that the charge level of the system's battery has fallen below a predetermined threshold.

PPM 70 may use its own services or services from OS 90 to dynamically scale power and performance. For example, if OS 90 supports two different performance modes identified as “run” and “idle,” PPM 70 may use services of OS 90 to enter those performance modes. In addition, as described in greater detail below, PPM 70 may recognize or create additional performance modes, and PPM 70 may use its own services (e.g., services for communicating with PMU 30) to enter those modes.

OS mapping module 78 includes resources for interfacing with one or more individual OSs. OS mapping module 78 thus provides a layer of abstraction between policy manager 80 and OS 90. Consequently, PPM 70 may be used with a different OS by simply replacing OS mapping module 78, modifying OS mapping module 78, or using different resources of OS mapping module 78.

FIG. 3 is a block diagram depicting software and hardware components in a processing system 500 with communications capabilities, in accordance with an example embodiment of the present invention. In particular, processing system 500 includes an applications subsystem 510 and a communications subsystem 540. Processing system 500 may also include a mobile scalable link (MSL) 550 to support communications between applications subsystem 510 and communications subsystem 540. Additional communication paths may also be provided, such as a serial link 552 and a serial small computer systems interface (SCSI) protocol (SSP) link 554.

Communications subsystem 540 may include various software components, such as a communications power management module (CPMM) 520, various protocol stack layers, and an MSL interface. CPMM 520 may handle power management for communications subsystem 540, and CPMM 520 may maintain its own state machine. CPMM 520 may interface to the different layers of the protocol stack. In addition, CPMM may support different power modes, such as a run duty cycle and a low power duty cycle, with different states for functions such as a global positioning system (GPS) and/or communications using technology such as a Global System for Mobile Communications (GSM) protocol.

Applications subsystem 510 may include software such as PPM 70 and OS power manager 94 for managing power in processing system 500. Applications subsystem 510 may also include a hardware abstraction layer (HAL) and various communications device drivers, such as power management IC (PMIC), audio, universal serial bus (USB), and MSL device drivers. The communications device drivers may operate as clients of PPM 70 and/or OS power manager 94, and those device drivers may receive notifications from PPM 70 and/or OS power manager 94 on appropriate state transitions. For example, when the OS goes into the standby mode, OS power manager 94 may notify one or more of the communications drivers about this state change. In response, communications subsystem 540 may enter a low power standby state, and, in conjunction with entering that state, may prepare itself for waking up applications subsystem 510, in case communications subsystem 540 subsequently transitions into a new state that requires processing on applications subsystem. 510. Communications between applications subsystem 510 and communications subsystem 540 may transpire as signaling events over a communications path such as MSL 550, general purpose I/O (GPIO) pins, or any other suitable path.

For dynamic performance and power scaling such as that described below, PPM 70 may also notify communications subsystem 540 about frequency and/or voltage changes via a communications device driver such as the MSL driver. CPMM 520 may then notify the communications software accordingly, thereby increasing the effectiveness of the power management approach, relative to a system that does not notify its communications subsystem regarding one or more types of power or performance changes in the applications subsystem. Thus, dynamic, system-level power management may be achieved, rather than simply application-level or communications-level power management.

FIG. 4 is a flowchart illustrating operations a method to manage power in a processing system, in accordance with an example embodiment of the present invention. When processing system 20 boots, processing system 20 may automatically load PPM 70. PPM 70 may do is to load a power policy profile 82 into policy manager 80 from nonvolatile storage, such as ROM 28 or ROM 29, for example. Power policy profile 82 may include various configuration settings for various components of PPM 70, such as one or more processor utilization thresholds, one or more performance thresholds, and one or more policy entries that may link certain operating states with corresponding platform reconfiguration directives, as described in greater detail below. Power policy profile 82 may represent or encode an overall power management policy for processing system 20.

Each of the configuration settings may be provided with PPM 70 as default value, or may be supplied or modified by a user such as a vendor, a system administrator, an end user, etc. Thus, as described below, PPM 70 may receive a user specified policy setting for processing system 20, and may update power policy profile 82, based at least in part on that policy setting. In one embodiment, some or all of the values in power policy profile 82 are developed through experimentation for a particular hardware configuration, OS, and typical workload. Experimentation may be used to develop suitable values for other hardware configurations, OSs, and workloads.

Referring to FIG. 4, at operation 410 the DMA profiler 74 may be initialized by launching DMA profiler 74. The process of launching DMA profiler 74 may include the operation of associating a callback routine with idle path 98 of OS 90. A hardware abstraction layer (HAL) or any other suitable technique may be used to associate DMA profiler 74 with idle execution path 98. For instance, PPM 70 may insert the callback routine into an interrupt service routine (ISR) associated with entering and/or exiting the processor idle mode.

DMA profiler 74 may set a sampling period, for example based on a default or user defined setting. DMA profiler 74 may then collect direct memory access data by measuring memory consumption (i.e., load) characteristics in various system locations such as, e.g., on a data bus, on a dynamic memory controller (DMC) and on a peripheral bus (PxBus). DMA profiler 74 may also collect data on cache accesses and cache misses. The sampling period may be static or dynamic.

At the end sampling period, DMA profiler 74 may determine non-core memory consumption parameters, i.e., what portion of the DMA activity is attributable to non-core activities such as, e.g., audio or video playback. For example, in some embodiments DMA profiler may measure memory consumption parameters in various locations when the system is not executing non-core activities such as, e.g., audio or video playback. These memory consumption parameters may be stored in a suitable memory location. Memory consumption parameters collected during the sampling period may be compared with the stored parameters to determine an approximation of the memory consumption attributable to non-core activities. For example, the memory consumption parameters stored in memory may be subtracted from the memory parameters measured during the sampling period.

If, at operation 425, the non-core memory consumption parameters (i.e., the load due to non-core operations) exceeds a threshold, then control passes to operation 435 and the DMA profiler 74 sets a flag in memory which indicates that the device is operating in a DMA Active mode. By contrast, if at operation 425 the load does not exceed the threshold, then control passes to operation 430 and DMA profiler 74 sets a flag in memory which indicates that the device is operating in a DMA Inactive mode.

Control then passes to operation 440 and the flag is used to manage a power state of the electronic device. For example, in some embodiments, the platform power manager 70 may use the flag to scale voltage and frequency dynamically in response to changes in the DMA load on the system. Further, the policy manager 80 can use the DMA profiler data to keep track of DMA requirements on system throughput and can re-adjust the system setting etc. to ensure that the data rate for DMA is maintained for required system functionality and performance.

Some of the operations described herein may be embodied as logic instructions on a computer-readable medium. When executed on a processor, the logic instructions cause a processor to be programmed as a special-purpose machine that implements the described methods. The processor, when configured by the logic instructions to execute the methods described herein, constitutes structure for performing the described methods. Alternatively, the methods described herein may be reduced to logic on, e.g., a field programmable gate array (FPGA), an application specific integrated circuit (ASIC) or the like.

The terms “logic instructions” as referred to herein relates to expressions which may be understood by one or more machines for performing one or more logical operations. For example, logic instructions may comprise instructions which are interpretable by a processor compiler for executing one or more operations on one or more data objects. However, this is merely an example of machine-readable instructions and embodiments are not limited in this respect.

The terms “computer readable medium” as referred to herein relates to media capable of maintaining expressions which are perceivable by one or more machines. For example, a computer readable medium may comprise one or more storage devices for storing computer readable instructions or data. Such storage devices may comprise storage media such as, for example, optical, magnetic or semiconductor storage media. However, this is merely an example of a computer readable medium and embodiments are not limited in this respect.

The term “logic” as referred to herein relates to structure for performing one or more logical operations. For example, logic may comprise circuitry which provides one or more output signals based upon one or more input signals. Such circuitry may comprise a finite state machine which receives a digital input and provides a digital output, or circuitry which provides one or more analog output signals in response to one or more analog input signals. Such circuitry may be provided in an application specific integrated circuit (ASIC) or field programmable gate array (FPGA). Also, logic may comprise machine-readable instructions stored in a memory in combination with processing circuitry to execute such machine-readable instructions. However, these are merely examples of structures which may provide logic and embodiments are not limited in this respect.

In the description and claims, the terms coupled and connected, along with their derivatives, may be used. In particular embodiments, connected may be used to indicate that two or more elements are in direct physical or electrical contact with each other. Coupled may mean that two or more elements are in direct physical or electrical contact. However, coupled may also mean that two or more elements may not be in direct contact with each other, but yet may still cooperate or interact with each other.

Reference in the specification to “one embodiment” “some embodiments” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least an implementation. The appearances of the phrase “in one embodiment” in various places in the specification may or may not be all referring to the same embodiment.

Although embodiments have been described in language specific to structural features and/or methodological acts, it is to be understood that claimed subject matter may not be limited to the specific features or acts described. Rather, the specific features and acts are disclosed as sample forms of implementing the claimed subject matter. 

1. An apparatus comprising: a processor having a core that is to access memory, the processor including logic to monitor one or more memory access parameters to characterize memory consumption and manage power consumption.
 2. The apparatus of claim 1, in which the power manager logic is to use the memory characterization to adjust a power state of the core.
 3. The apparatus of claim 1, in which the power manager logic is to use the memory characterization to adjust a power state of the memory.
 4. The apparatus of claim 1, in which the memory characterization is to be used to determine a core utilization parameter.
 5. The apparatus of claim 1, in which one or more memory access parameters includes at least one of a number of cache accesses and a number of cache misses.
 6. The apparatus of claim 1, in which the processor includes a performance monitoring unit (PMU) to provide core utilization information to the power manager.
 7. The apparatus of claim 1, in which memory consumption parameters include main memory access parameters.
 8. The apparatus of claim 1, in which the processor is to communicate at least one memory consumption characteristic to a policy manager.
 9. The apparatus of claim 1, in which the one or more memory consumption parameters are from at least one of a data bus, a dynamic memory controller, and a peripheral bus.
 10. The apparatus of claim 1, in which the logic is implemented outside of the core.
 11. The apparatus of claim 1, in which the logic is implemented by the core.
 12. An apparatus, comprising: a memory; and a processor coupled to the memory, the processor having a core that is to access the memory, the processor to monitor one or more memory access parameters to manage power provided to at least one of the processor and the memory.
 13. The apparatus of claim 12, in which the processor is to perform a memory characterization to determine a core utilization parameter.
 14. The apparatus of claim 12, in which one or more memory access parameters includes at least one of a number of cache accesses and a number of cache misses.
 15. The apparatus of claim 12, in which the processor includes a performance monitoring unit (PMU) to provide core utilization information.
 16. The apparatus of claim 12, in which memory consumption parameters include main memory access parameters.
 17. The apparatus of claim 12, in which the processor is to communicate at least one memory consumption parameter to a policy manager.
 18. The apparatus of claim 12, in which the one or more memory consumption parameters are from at least one of a data bus, a dynamic memory controller, and a peripheral bus. 